CVE-2025-68665
LangChain serialization injection vulnerability enables secret extraction
Description
LangChain is a framework for building LLM-powered applications. Prior to @langchain/core versions 0.3.80 and 1.1.8, and prior to langchain versions 0.3.37 and 1.2.3, a serialization injection vulnerability exists in LangChain JS's toJSON() method (and subsequently when string-ifying objects using JSON.stringify(). The method did not escape objects with 'lc' keys when serializing free-form data in kwargs. The 'lc' key is used internally by LangChain to mark serialized objects. When user-controlled data contains this key structure, it is treated as a legitimate LangChain object during deserialization rather than plain user data. This issue has been patched in @langchain/core versions 0.3.80 and 1.1.8, and langchain versions 0.3.37 and 1.2.3
INFO
Published Date :
Dec. 23, 2025, 11:15 p.m.
Last Modified :
Jan. 13, 2026, 4:17 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
Affected Products
The following products are affected by CVE-2025-68665
vulnerability.
Even if cvefeed.io is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | HIGH | [email protected] | ||||
| CVSS 3.1 | CRITICAL | [email protected] |
Solution
- Update @langchain/core to version 0.3.80 or later.
- Update @langchain/core to version 1.1.8 or later.
- Update langchain to version 0.3.37 or later.
- Update langchain to version 1.2.3 or later.
Public PoC/Exploit Available at Github
CVE-2025-68665 has a 2 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2025-68665.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2025-68665 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2025-68665
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
None
Local database for: Security vulnerabilities inclusive of CVEs and GitHub originated security advisories from the world of open source software.
Makefile Python
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2025-68665 vulnerability anywhere in the article.
-
The Hacker News
Critical LangChain Core Vulnerability Exposes Secrets via Serialization Injection
Dec 26, 2025Ravie LakshmananAI Security / DevSecOps A critical security flaw has been disclosed in LangChain Core that could be exploited by an attacker to steal sensitive secrets and even influence ... Read more
-
CybersecurityNews
Critical Langchain Vulnerability Let attackers Exfiltrate Sensitive Secrets from AI systems
A critical vulnerability in LangChain’s core library (CVE-2025-68664) allows attackers to exfiltrate sensitive environment variables and potentially execute code through deserialization flaws. Discove ... Read more
The following table lists the changes that have been made to the
CVE-2025-68665 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Jan. 13, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N Added CPE Configuration OR *cpe:2.3:a:langchain:langchain.js:*:*:*:*:*:*:*:* versions up to (excluding) 0.3.37 *cpe:2.3:a:langchain:langchain.js:*:*:*:*:*:*:*:* versions from (including) 1.0.0 up to (excluding) 1.2.3 *cpe:2.3:a:langchain:langchain/core:*:*:*:*:*:node.js:*:* versions up to (excluding) 0.3.80 *cpe:2.3:a:langchain:langchain/core:*:*:*:*:*:node.js:*:* versions from (including) 1.0.0 up to (excluding) 1.1.8 Added Reference Type GitHub, Inc.: https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62 Types: Patch Added Reference Type GitHub, Inc.: https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8 Types: Release Notes Added Reference Type GitHub, Inc.: https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3 Types: Release Notes Added Reference Type CISA-ADP: https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6 Types: Vendor Advisory Added Reference Type GitHub, Inc.: https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6 Types: Vendor Advisory -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Dec. 24, 2025
Action Type Old Value New Value Added Reference https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6 -
New CVE Received by [email protected]
Dec. 23, 2025
Action Type Old Value New Value Added Description LangChain is a framework for building LLM-powered applications. Prior to @langchain/core versions 0.3.80 and 1.1.8, and prior to langchain versions 0.3.37 and 1.2.3, a serialization injection vulnerability exists in LangChain JS's toJSON() method (and subsequently when string-ifying objects using JSON.stringify(). The method did not escape objects with 'lc' keys when serializing free-form data in kwargs. The 'lc' key is used internally by LangChain to mark serialized objects. When user-controlled data contains this key structure, it is treated as a legitimate LangChain object during deserialization rather than plain user data. This issue has been patched in @langchain/core versions 0.3.80 and 1.1.8, and langchain versions 0.3.37 and 1.2.3 Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N Added CWE CWE-502 Added Reference https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62 Added Reference https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8 Added Reference https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3 Added Reference https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6